package cn.iocoder.yudao.module.energy.controller.admin.alert.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 预警 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AlertRespVO {

    @Schema(description = "预警ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @ExcelProperty("预警ID")
    private Long id;

    @Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12345")
    @ExcelProperty("设备ID")
    private String deviceId;

    @Schema(description = "设备名称")
    @ExcelProperty("设备名称")
    private String deviceName;

    @Schema(description = "预警类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "OVER_VOLTAGE")
    @ExcelProperty("预警类型")
    private String alertType;

    @Schema(description = "实际值", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("实际值")
    private BigDecimal alertValue;

    @Schema(description = "阈值", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("阈值")
    private BigDecimal threshold;

    @Schema(description = "预警时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("预警时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime alertTime;

    @Schema(description = "预警信息")
    @ExcelProperty("预警信息")
    private String message;

    @Schema(description = "处理状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "PENDING")
    @ExcelProperty("处理状态")
    private String status;

    @Schema(description = "告警级别", requiredMode = Schema.RequiredMode.REQUIRED, example = "warning")
    @ExcelProperty("告警级别")
    private String level;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

} 